<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Docs For Class Core</title>
	<link rel="stylesheet" type="text/css" href="../media/style.css">
	<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
	<td class="header-top-left"><img src="../media/logo.png" border="0" alt="phpDocumentor " /></td>
    <td class="header-top-right">Buan<br /><div class="header-top-right-subpackage"></div></td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td colspan="2" class="header-menu">
      
                        
                      		[ <a href="../classtrees_Buan.html" class="menu">class tree: Buan</a> ]
		[ <a href="../elementindex_Buan.html" class="menu">index: Buan</a> ]
            [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td colspan="2" class="header-line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="195" class="menu">
		<div class="package-title">Buan</div>
  <div class="package">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
	</div>
      <b>Packages:</b><br />
  <div class="package">
              <a href="../li_Buan.html">Buan</a><br />
      	</div>
      <br />
                        <b>Files:</b><br />
        <div class="package">
				<span style="padding-left: 1em;"><a href="../Buan/_BuanAutoLoader.php.html">BuanAutoLoader.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanConfig.php.html">BuanConfig.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanController.php.html">BuanController.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanCore.php.html">BuanCore.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanDatabase.php.html">BuanDatabase.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanException.php.html">BuanException.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanExtension.php.html">BuanExtension.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanInflector.php.html">BuanInflector.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModel.php.html">BuanModel.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelCollection.php.html">BuanModelCollection.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelCriteria.php.html">BuanModelCriteria.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelCriteriaGroup.php.html">BuanModelCriteriaGroup.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelManager.php.html">BuanModelManager.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelRelation.php.html">BuanModelRelation.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanModelTracker.php.html">BuanModelTracker.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanObject.php.html">BuanObject.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanPdoStatementWrapper.php.html">BuanPdoStatementWrapper.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanPdoWrapper.php.html">BuanPdoWrapper.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanSystemLog.php.html">BuanSystemLog.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanSystemLogEntry.php.html">BuanSystemLogEntry.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanUrlCommand.php.html">BuanUrlCommand.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/_BuanView.php.html">BuanView.php</a></span><br />
	  </div>
  <div class="package">
	<strong>ViewHelper</strong><br />			<span style="padding-left: 1em;"><a href="../Buan/ViewHelper/_view-helper---BuanViewHelperHtml.php.html">BuanViewHelperHtml.php</a></span><br />
			<span style="padding-left: 1em;"><a href="../Buan/ViewHelper/_view-helper---BuanViewHelperI18n.php.html">BuanViewHelperI18n.php</a></span><br />
	  </div>
            <br />
                  <b>Classes:</b><br />
        <div class="package">
		    		<a href="../Buan/AutoLoader.html">AutoLoader</a>    	 <br />
	    		<a href="../Buan/Config.html">Config</a>    	 <br />
	    		<a href="../Buan/Controller.html">Controller</a>    	 <br />
	    		<a href="../Buan/Core.html">Core</a>    	 <br />
	    		<a href="../Buan/Database.html">Database</a>    	 <br />
	    		<a href="../Buan/Exception.html">Exception</a>    	 <br />
	    		<a href="../Buan/Extension.html">Extension</a>    	 <br />
	    		<a href="../Buan/Inflector.html">Inflector</a>    	 <br />
	    		<a href="../Buan/Model.html">Model</a>    	 <br />
	    		<a href="../Buan/ModelCollection.html">ModelCollection</a>    	 <br />
	    		<a href="../Buan/ModelCriteria.html">ModelCriteria</a>    	 <br />
	    		<a href="../Buan/ModelCriteriaGroup.html">ModelCriteriaGroup</a>    	 <br />
	    		<a href="../Buan/ModelManager.html">ModelManager</a>    	 <br />
	    		<a href="../Buan/ModelRelation.html">ModelRelation</a>    	 <br />
	    		<a href="../Buan/ModelTracker.html">ModelTracker</a>    	 <br />
	    		<a href="../Buan/Object.html">Object</a>    	 <br />
	    		<a href="../Buan/PdoStatementWrapper.html">PdoStatementWrapper</a>    	 <br />
	    		<a href="../Buan/PdoWrapper.html">PdoWrapper</a>    	 <br />
	    		<a href="../Buan/SystemLog.html">SystemLog</a>    	 <br />
	    		<a href="../Buan/SystemLogEntry.html">SystemLogEntry</a>    	 <br />
	    		<a href="../Buan/UrlCommand.html">UrlCommand</a>    	 <br />
	    		<a href="../Buan/View.html">View</a>    	 <br />
	  </div>
  <div class="package">
	ViewHelper<br />	    <span style="padding-left: 1em;">		<a href="../Buan/ViewHelper/Html.html">Html</a>    </span>	 <br />
	    <span style="padding-left: 1em;">		<a href="../Buan/ViewHelper/I18n.html">I18n</a>    </span>	 <br />
	  </div>
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1>Class: Core</h1>
Source Location: /BuanCore.php<br /><br />

<h2 class="class-name">Class Core</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Class Overview</div>
	<div class="nav-bar">
					<span class="disabled">Class Overview</span>
						
													| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
								</div>
	<div class="info-box-body">
		<table width="100%" border="0">
		<tr><td valign="top" width="60%" class="class-overview">

        		
		<p class="notes">
			Located in <a class="field" href="_BuanCore.php.html">/BuanCore.php</a> [<span class="field">line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a6">6</a></span>]
		</p>

		
		<pre></pre>

		
		
		
		</td>

		
				<td valign="top" width="20%" class="class-overview">
		<p align="center" class="short-description"><strong><a href="#sec_methods">Methods</a></strong></p>
		<ul>
		  		  <li><a href="../Buan/Core.html#methodboot">boot</a></li>
		  		  <li><a href="../Buan/Core.html#methodconfigure">configure</a></li>
		  		  <li><a href="../Buan/Core.html#methodgetLoginView">getLoginView</a></li>
		  		  <li><a href="../Buan/Core.html#methodhalt">halt</a></li>
		  		  <li><a href="../Buan/Core.html#methodhasAdminAccess">hasAdminAccess</a></li>
		  		  <li><a href="../Buan/Core.html#methodsetAdminAccess">setAdminAccess</a></li>
		  		  <li><a href="../Buan/Core.html#methodshutdown">shutdown</a></li>
		  		</ul>
		</td>
		
		</tr></table>
		<div class="top">[ <a href="#top">Top</a> ]</div>
	</div>
</div>





	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
									    					| <span class="disabled">Method Summary</span> | <a href="#sec-methods">Methods Detail</a>
		</div>
		<div class="info-box-body">
			<div class="method-summary">
				<table border="0" cellspacing="0" cellpadding="0" class="method-summary">
												<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">void</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#boot" title="details" class="method-name">boot</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Performs the following tasks: <ol><li>Generates a UrlCommand instance from the given $urlPath</li><li>Executes the UrlCommand and attaches the resulting View to the GlobalView</li><li>Renders the GlobalView to output.</li></ol></td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">void</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#configure" title="details" class="method-name">configure</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">This method prepares the Buan environment by reading and acting on a set of  configuration scripts found in $configPath.</td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">Buan\View</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#getLoginView" title="details" class="method-name">getLoginView</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Returns the application login View (/core/app-login) so the user can  potentially gain core admin access.</td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">void</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#halt" title="details" class="method-name">halt</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Stops the system in it tracks and renders whatever Views have been added to  the queue.</td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">bool</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#hasAdminAccess" title="details" class="method-name">hasAdminAccess</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Determines if the user has logged in using the application password.</td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">void</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#setAdminAccess" title="details" class="method-name">setAdminAccess</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Sets whether or not the user has Buan admin access to the application.</td></tr>
				</div>
																<div class="method-definition">
					<tr><td class="method-definition">static
											<span class="method-result">void</span>&nbsp;&nbsp;
					</td>
					<td class="method-definition"><a href="#shutdown" title="details" class="method-name">shutdown</a>()&nbsp;&nbsp;</td>
					<td class="method-definition">Deinitialises the application, generally cleaning up.</td></tr>
				</div>
																																																																								</table>
			</div>
			<br /><div class="top">[ <a href="#top">Top</a> ]</div>
		</div>
	</div>


	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Class Overview</a>
																			| <a href="#sec-method-summary">Method Summary</a> | <span class="disabled">Methods Detail</span>
					</div>
		<div class="info-box-body">
			<a name='method_detail'></a>
<a name="methodboot" id="boot"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">static method boot</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a131">131</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static void boot(
[string
$urlPath = NULL]&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Performs the following tasks: <ol><li>Generates a UrlCommand instance from the given $urlPath</li><li>Executes the UrlCommand and attaches the resulting View to the GlobalView</li><li>Renders the GlobalView to output.</li></ol>
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$urlPath:&nbsp;</span></td>
				<td>
				<span class="var-description"> The URL to boot</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodconfigure" id="configure"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">static method configure</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a24">24</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static void configure(
string
$configPath&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>This method prepares the Buan environment by reading and acting on a set of  configuration scripts found in $configPath.
</strong></p>
<span class="description"><p>$configPath should contain the following script:  app.php		= Set config variables, db connections and Model relations  bootstrap.php	= An optional script that performs your custom routines</p><p>The following tasks are executed in order: <ol><li>&quot;app.php&quot; is executed.</li><li>Any extensions defined in &quot;app.extensions&quot; are initialised.</li><li>&quot;bootstrap.php&quot; is executed.</li></ol></p></span>
			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$configPath:&nbsp;</span></td>
				<td>
				<span class="var-description"> Absolute path to folder containing your configuration files</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetLoginView" id="getLoginView"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">static method getLoginView</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a251">251</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static Buan\View getLoginView(
[string
$refererUrl = NULL]&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Returns the application login View (/core/app-login) so the user can  potentially gain core admin access.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">string</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$refererUrl:&nbsp;</span></td>
				<td>
				<span class="var-description"> After a successful login, the user will be redirected here</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodhalt" id="halt"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">static method halt</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a160">160</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static void halt(
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Stops the system in it tracks and renders whatever Views have been added to  the queue.
</strong></p>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />

<strong>Information Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Todo:</strong>&nbsp;&nbsp;</td><td>If any calls to Core::halt() occur within the rendering code or  templates then recursion will appear. How do we get around that? Set a  static var to ensure this is called only once?</td>
  </tr>
</table>

		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodhasAdminAccess" id="hasAdminAccess"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">static method hasAdminAccess</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a195">195</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static bool hasAdminAccess(
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Determines if the user has logged in using the application password.
</strong></p>
<span class="description"><p>If not then a common reaction would be to build the application login  interface using: 	Core::getLoginView()</p></span>
	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetAdminAccess" id="setAdminAccess"><!-- --></a>
<div class="oddrow">

<div class="method-header">
	<span class="method-title">static method setAdminAccess</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a226">226</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static void setAdminAccess(
[bool
$state = FALSE]&nbsp;
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Sets whether or not the user has Buan admin access to the application.
</strong></p>

			<strong>Parameters:</strong><br />
			<table border="0" cellspacing="0" cellpadding="0">
					<tr><td class="indent">
				<span class="var-type">bool</span>&nbsp;&nbsp;</td>
				<td>
				<span class="var-name">$state:&nbsp;</span></td>
				<td>
				<span class="var-description"> The access flag to set</span>			</td></tr>
				</table>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodshutdown" id="shutdown"><!-- --></a>
<div class="evenrow">

<div class="method-header">
	<span class="method-title">static method shutdown</span>&nbsp;&nbsp;<span class="smalllinenumber">[line <a href="../__filesource/fsource_Buan__BuanCore.php.html#a175">175</a>]</span>
</div>
<br />

	<div class="function">
    <table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
    <table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">&nbsp;
		<code>static void shutdown(
)</code>
    </td></tr></table>
    </td></tr></table><br /></div>

	<p align="center" class="short-description"><strong>Deinitialises the application, generally cleaning up.
</strong></p>

	<br />
	<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="indent"><strong>Access:</strong>&nbsp;&nbsp;</td><td>public</td>
  </tr>
</table>
<br />


		
		<br />
	<div class="top">[ <a href="#top">Top</a> ]</div>
</div>

		</div>
	</div>


        <div class="credit">
		    <hr class="separator" />
		    Documentation generated on Tue, 04 Aug 2009 19:58:58 +0100 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.1</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>